﻿/**************************************************************
 *
 * 命名空间：Sgr.UPMS.Application.Commands.Menus
 * 创建时间：2025/3/20
 * 描述：创建菜单命令
 *
 **************************************************************/

using MediatR;
using Sgr.Application.Commands;
using Sgr.Domain.Uow;
using Sgr.UPMS.Domain.Menus;

namespace Sgr.UPMS.Application.Commands.Menus
{
    /// <summary>
    /// 创建菜单命令
    /// </summary>
    public class CreateMenuCommand : IRequest<CommandResult<bool>>, IRequireUnitOfWork
    {
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 菜单类型
        /// </summary>
        public MenuType Type { get; set; }

        /// <summary>
        /// 父级菜单ID
        /// </summary>
        public long? ParentId { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string? Icon { get; set; }

        /// <summary>
        /// 路由名称
        /// </summary>
        public string? RouteName { get; set; }

        /// <summary>
        /// 路由路径
        /// </summary>
        public string? RoutePath { get; set; }

        /// <summary>
        /// 组件路径
        /// </summary>
        public string? ComponentPath { get; set; }

        /// <summary>
        /// 重定向
        /// </summary>
        public string? RedirectPath { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string? Permission { get; set; }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string? Description { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int? Order { get; set; }

        /// <summary>
        /// 是否外部链接
        /// </summary>
        public bool ExternalLink { get; set; }

        /// <summary>
        /// 是否隐藏
        /// </summary>
        public bool Hidden { get; set; }

        /// <summary>
        /// 是否启用缓存
        /// </summary>
        public bool KeepAlive { get; set; }

        /// <summary>
        /// 是否固定
        /// </summary>
        public bool Affix { get; set; }

        /// <summary>
        /// 目标窗口
        /// </summary>
        public TargetType? Target { get; set; }
    }
}